package com.yingxin.yxerp.module.report.vo.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yingxin.yx.framework.commons.enums.DynamicTaskSetTypeEnums;
import com.yingxin.yx.framework.commons.vo.CommonRespVo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

/**
 * 动态任务-地址设置 实体类
 * @author yuebao
 * @date 2023-11-25
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DynamicTaskSetRespVo", description = "view")
public class DynamicTaskSetRespVo extends CommonRespVo {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private String id;

    /**
     * 分类
     */
    private String taskType;

    /**
     * 分类名称
     */
    private String taskTypeName;

    public String getTaskTypeName(){
        if( StringUtils.isNotEmpty( taskType ) ){
            return DynamicTaskSetTypeEnums.getEnum( taskType ).getTypeName();
        }
        return null;
    }

    /**
     * url
     */
    private String taskUrl;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人id
     */
    private String creatorId;

    /**
     * 创建人姓名
     */
    private String creatorName;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新者id
     */
    private String updaterId;

    /**
     * 更新者姓名
     */
    private String updaterName;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

}
